function isMobile() {
    return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}

$(document).ready(function($) {
    // 选择chainnet
    var $netCurrent = $('#change-chainnet .dropdown-toggle');
    var $netItems = $('#change-chainnet .dropdown-item');
    $netCurrent
        .text(app.config.chainnetName)
        .parent()
        .removeClass('d-none');
    $('#change-chainnet .dropdown-item[data-chainnet="' + app.chainnet + '"]').addClass('active');
    $netItems.click(function() {
        var chainnet = $(this).data('chainnet');
        localStorage.setItem('chainnet', chainnet);
        window.location.reload();
        // console.log(app.config);
    });
});
